Skip to content

Conversation

@tharropoulos
Copy link
Contributor

TLDR

Migrate CI from pip to uv, replace multiple linting tools with Ruff, and remove EOL Python 3.8 support.

Change Summary

CI/CD Modernization:

  1. In .github/workflows/test-and-lint.yml:

    • Replace actions/setup-python with astral-sh/setup-uv@v5 for faster dependency management
    • Switch from pip install to uv sync --locked --all-extras --dev for reproducible builds
    • Update all test/lint commands to use uv run prefix
    • Remove Python 3.8 from test matrix (now supports Python 3.9-3.12)
  2. In .github/workflows/release.yml:

    • Update release workflow to use Python 3.9 instead of 3.8

Code Quality Tool Consolidation:

  1. In pyproject.toml:

    • Add Ruff as the primary linting and formatting tool
    • Remove legacy tools: wemake-python-styleguide, flake8, black
    • Add isort for import sorting compatibility
  2. New Configuration in ruff.toml:

    • Configure Ruff with Python 3.9+ target
    • Enable essential error checking (E4, E7, E9, F, B rules)
    • Set line length to 88 characters matching Black's default
    • Enable docstring code formatting

Bug Fixes:

  1. In src/typesense/stemming_dictionaries.py:
    • Fix exception chaining by adding from err to preserve original exception context

Dependency Management:

  1. Updated lock files:
    • uv.lock: Removed 50+ legacy linting dependencies, added Ruff and isort
    • Significantly reduced dependency tree complexity

Context

This modernization improves CI performance by leveraging uv's faster dependency resolution and installation. Dropping Python 3.8 support aligns with its EOL status and allows use of modern tooling.

@kishorenc kishorenc merged commit f33c6a3 into typesense:master May 27, 2025
4 checks passed
@ulgens
Copy link
Contributor

ulgens commented Nov 23, 2025

Hey @tharropoulos I tried to understand why .txt formatted dependency lists are still in place but I wasn't able to. It looks like those files are not used for anything in the repo. Can they be deleted or do you had something in mind for them?

@tharropoulos
Copy link
Contributor Author

Only reason is for users not using uv and instead just use raw pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants